package com.why.dto;

import jakarta.validation.constraints.Pattern;
import lombok.Data;
import org.springframework.validation.annotation.Validated;

import java.io.Serializable;
@Validated
@Data
public class UserDTO implements Serializable {

    @Pattern(regexp = "^[A-Za-z0-9_]{5,16}$", message = "用户名格式不正确")
    private String username;

    @Pattern(regexp = "^[A-Za-z0-9_]{5,16}$", message = "密码格式不正确")
    private String password;


}
